package com.ltwc.lttv.tools

import android.view.View
import android.view.animation.ScaleAnimation
import com.ltwc.lttv.models.TVViewModel

class ScaleAnimationTool {

    companion object instance{
        fun startScaleAnimation(view: View, fromScale: Float, toScale: Float, duration: Long) {
            val scaleAnimation = ScaleAnimation(
                fromScale,
                toScale,
                fromScale,
                toScale,
                ScaleAnimation.RELATIVE_TO_SELF,
                0.5f,
                ScaleAnimation.RELATIVE_TO_SELF,
                0.5f
            )
            scaleAnimation.duration = duration
            scaleAnimation.fillAfter = true
            scaleAnimation.setZAdjustment(1);
            view.startAnimation(scaleAnimation)
        }

    }



}